import request from '@/utils/request'

// 查询业务-订单印刷品列表
export function listOrdersPrint(query) {
  return request({
    url: '/business/ordersPrint/list',
    method: 'get',
    params: query
  })
}

// 查询业务-订单印刷品详细
export function getOrdersPrint(id) {
  return request({
    url: '/business/ordersPrint/' + id,
    method: 'get'
  })
}

// 新增业务-订单印刷品
export function addOrdersPrint(data) {
  return request({
    url: '/business/ordersPrint',
    method: 'post',
    data: data
  })
}

// 修改业务-订单印刷品
export function updateOrdersPrint(data) {
  return request({
    url: '/business/ordersPrint',
    method: 'put',
    data: data
  })
}

// 删除业务-订单印刷品
export function delOrdersPrint(id) {
  return request({
    url: '/business/ordersPrint/' + id,
    method: 'delete'
  })
}

// 导出文件
export function exportExcel(data){
  return request({
    url: '/business/ordersPrint/export',
    method: 'post',
    data: data
  })
}


// 状态变更
export function updateChangeStatus(ids, status){
  return request({
    url: '/business/ordersPrint/changeStatus',
    method: 'put',
    params: {
      ids: ids,
      status: status
    }
  })
}

// 刷新缓存
export function refreshCache() {
  return request({
    url: '/business/ordersPrint/refreshCache',
    method: 'delete'
  })
}

//检查印刷品编码是否已存在
export function getDoesIsExist(query) {
  return request({
    url: '/business/ordersPrint/getDoesIsExist',
    method: 'get',
    params: query
  })
}
